#include<iostream>
#include<vector>
#include<queue>
#include<cstring>
#include<cmath>
#include<map>
#include<set>
#include<cstdio>
#include<algorithm>
#define debug(a) cout<<#a<<"="<<a<<endl;
using namespace std;
const int maxn=1e5+1000;
typedef long long LL;
LL a[maxn];
void work(LL i,LL j,LL k){
    LL t=a[i]^a[j]^a[k];
    a[i]=a[j]=a[k]=t;
}
int main(void)
{
  cin.tie(0);std::ios::sync_with_stdio(false);
  LL n;cin>>n;
  for(LL i=1;i<=n;i++){
    cin>>a[i];
  }
  if(n&1){
    cout<<"YES"<<endl;
    cout<<n-2<<endl;
    for(LL i=2;i<=n-3;i+=2){
        cout<<i<<" "<<i+1<<" "<<i+2<<endl;
    }
    cout<<n-1<<" "<<n<<" "<<1<<endl;
    for(LL i=2;i<=n-3;i+=2){
        cout<<1<<" "<<i<<" "<<i+1<<endl;
    }
  }
  else{
    for(LL i=2;i<=n-3-1;i+=2){
        work(i,i+1,i+2);
    }
    work(n-1-1,n-1,1);
    if(a[n]!=a[1]){
        cout<<"NO"<<endl;
    }
    else{
        cout<<"YES"<<endl;
        cout<<n-2-1<<endl;
        for(LL i=2;i<=n-3-1;i+=2){
            cout<<i<<" "<<i+1<<" "<<i+2<<endl;
        }
        cout<<n-1-1<<" "<<n-1<<" "<<1<<endl;
        for(LL i=2;i<=n-3-1;i+=2){
            cout<<1<<" "<<i<<" "<<i+1<<endl;
        }
    }
  }
return 0;
}
